import request from '../utils/request'

// 轮播图列表
export function bannerList() {
    return request.get('/banner/list')
}
// 删除单条轮播图
export function deleteBanner(bannerid) {
    return request.get('/banner/delete',{
        params:{
            bannerid
        }
    })
}

// 添加轮播图
export function addBanner(formData) {
    const {img,alt,link} = formData
    return request.post('/banner/add',{
        img,
        alt,
        link
    })
}

// 轮播图访问状态 
export function updateFlag(bannerid,flag){
    return request.post('/banner/updateFlag',{
        bannerid,
        flag
    })
}